package com.tqsa.common.enums;


import com.tqsa.common.convention.errorcode.IErrorCode;

/**
 * 用户错误码
 * @author tqsa01
 */
public enum UserErrorCodeEnum implements IErrorCode {

    USER_NULL("B00200", "用户记录不存在"),

    USER_NAME_EXIST("B00201", "用户名已存在"),

    USER_EXIST("B00202", "用户记录已存在"),

    USER_SAVE_ERROR("B00203", "用户记录新增失败"),

    USER_UPDATE_ERROR("B00204", "用户记录修改失败"),

    USER_DELETE_ERROR("B00205", "用户记录删除失败");

    private final String code;

    private final String message;

    UserErrorCodeEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }
}
